package com.eshop.modules.shop.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("system_user_level")
public class SystemUserLevel extends BaseDomain
{
    @TableId
    private Integer id;
    private Integer merId;
    @NotBlank(message = "名称必填")
    private String name;
    private BigDecimal money;
    private Integer validDate;
    private Integer isForever;
    private Integer isPay;
    private Integer isShow;
    @NotNull(message = "请输入会员等级")
    private Integer grade;
    @NotNull(message = "请输入会员折扣")
    private BigDecimal discount;
    @NotBlank(message = "请上传会员背景")
    private String image;
    @NotBlank(message = "请上传会员图标")
    private String icon;
    @TableField("`explain`")
    private String explain;
    
    public void copy(final SystemUserLevel source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Integer getId() {
        return this.id;
    }
    
    public Integer getMerId() {
        return this.merId;
    }
    
    public String getName() {
        return this.name;
    }
    
    public BigDecimal getMoney() {
        return this.money;
    }
    
    public Integer getValidDate() {
        return this.validDate;
    }
    
    public Integer getIsForever() {
        return this.isForever;
    }
    
    public Integer getIsPay() {
        return this.isPay;
    }
    
    public Integer getIsShow() {
        return this.isShow;
    }
    
    public Integer getGrade() {
        return this.grade;
    }
    
    public BigDecimal getDiscount() {
        return this.discount;
    }
    
    public String getImage() {
        return this.image;
    }
    
    public String getIcon() {
        return this.icon;
    }
    
    public String getExplain() {
        return this.explain;
    }
    
    public void setId(final Integer id) {
        this.id = id;
    }
    
    public void setMerId(final Integer merId) {
        this.merId = merId;
    }
    
    public void setName(final String name) {
        this.name = name;
    }
    
    public void setMoney(final BigDecimal money) {
        this.money = money;
    }
    
    public void setValidDate(final Integer validDate) {
        this.validDate = validDate;
    }
    
    public void setIsForever(final Integer isForever) {
        this.isForever = isForever;
    }
    
    public void setIsPay(final Integer isPay) {
        this.isPay = isPay;
    }
    
    public void setIsShow(final Integer isShow) {
        this.isShow = isShow;
    }
    
    public void setGrade(final Integer grade) {
        this.grade = grade;
    }
    
    public void setDiscount(final BigDecimal discount) {
        this.discount = discount;
    }
    
    public void setImage(final String image) {
        this.image = image;
    }
    
    public void setIcon(final String icon) {
        this.icon = icon;
    }
    
    public void setExplain(final String explain) {
        this.explain = explain;
    }
    
    public String toString() {
        return "SystemUserLevel(id=" + this.getId() + ", merId=" + this.getMerId() + ", name=" + this.getName() + ", money=" + this.getMoney() + ", validDate=" + this.getValidDate() + ", isForever=" + this.getIsForever() + ", isPay=" + this.getIsPay() + ", isShow=" + this.getIsShow() + ", grade=" + this.getGrade() + ", discount=" + this.getDiscount() + ", image=" + this.getImage() + ", icon=" + this.getIcon() + ", explain=" + this.getExplain() + ")";
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof SystemUserLevel)) {
            return false;
        }
        final SystemUserLevel other = (SystemUserLevel)o;
        if (!other.canEqual(this)) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0075: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0075;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0075;
            }
            return false;
        }
        final Object this$merId = this.getMerId();
        final Object other$merId = other.getMerId();
        Label_0112: {
            if (this$merId == null) {
                if (other$merId == null) {
                    break Label_0112;
                }
            }
            else if (this$merId.equals(other$merId)) {
                break Label_0112;
            }
            return false;
        }
        final Object this$validDate = this.getValidDate();
        final Object other$validDate = other.getValidDate();
        Label_0149: {
            if (this$validDate == null) {
                if (other$validDate == null) {
                    break Label_0149;
                }
            }
            else if (this$validDate.equals(other$validDate)) {
                break Label_0149;
            }
            return false;
        }
        final Object this$isForever = this.getIsForever();
        final Object other$isForever = other.getIsForever();
        Label_0186: {
            if (this$isForever == null) {
                if (other$isForever == null) {
                    break Label_0186;
                }
            }
            else if (this$isForever.equals(other$isForever)) {
                break Label_0186;
            }
            return false;
        }
        final Object this$isPay = this.getIsPay();
        final Object other$isPay = other.getIsPay();
        Label_0223: {
            if (this$isPay == null) {
                if (other$isPay == null) {
                    break Label_0223;
                }
            }
            else if (this$isPay.equals(other$isPay)) {
                break Label_0223;
            }
            return false;
        }
        final Object this$isShow = this.getIsShow();
        final Object other$isShow = other.getIsShow();
        Label_0260: {
            if (this$isShow == null) {
                if (other$isShow == null) {
                    break Label_0260;
                }
            }
            else if (this$isShow.equals(other$isShow)) {
                break Label_0260;
            }
            return false;
        }
        final Object this$grade = this.getGrade();
        final Object other$grade = other.getGrade();
        Label_0297: {
            if (this$grade == null) {
                if (other$grade == null) {
                    break Label_0297;
                }
            }
            else if (this$grade.equals(other$grade)) {
                break Label_0297;
            }
            return false;
        }
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        Label_0334: {
            if (this$name == null) {
                if (other$name == null) {
                    break Label_0334;
                }
            }
            else if (this$name.equals(other$name)) {
                break Label_0334;
            }
            return false;
        }
        final Object this$money = this.getMoney();
        final Object other$money = other.getMoney();
        Label_0371: {
            if (this$money == null) {
                if (other$money == null) {
                    break Label_0371;
                }
            }
            else if (this$money.equals(other$money)) {
                break Label_0371;
            }
            return false;
        }
        final Object this$discount = this.getDiscount();
        final Object other$discount = other.getDiscount();
        Label_0408: {
            if (this$discount == null) {
                if (other$discount == null) {
                    break Label_0408;
                }
            }
            else if (this$discount.equals(other$discount)) {
                break Label_0408;
            }
            return false;
        }
        final Object this$image = this.getImage();
        final Object other$image = other.getImage();
        Label_0445: {
            if (this$image == null) {
                if (other$image == null) {
                    break Label_0445;
                }
            }
            else if (this$image.equals(other$image)) {
                break Label_0445;
            }
            return false;
        }
        final Object this$icon = this.getIcon();
        final Object other$icon = other.getIcon();
        Label_0482: {
            if (this$icon == null) {
                if (other$icon == null) {
                    break Label_0482;
                }
            }
            else if (this$icon.equals(other$icon)) {
                break Label_0482;
            }
            return false;
        }
        final Object this$explain = this.getExplain();
        final Object other$explain = other.getExplain();
        if (this$explain == null) {
            if (other$explain == null) {
                return true;
            }
        }
        else if (this$explain.equals(other$explain)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof SystemUserLevel;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $merId = this.getMerId();
        result = result * 59 + (($merId == null) ? 43 : $merId.hashCode());
        final Object $validDate = this.getValidDate();
        result = result * 59 + (($validDate == null) ? 43 : $validDate.hashCode());
        final Object $isForever = this.getIsForever();
        result = result * 59 + (($isForever == null) ? 43 : $isForever.hashCode());
        final Object $isPay = this.getIsPay();
        result = result * 59 + (($isPay == null) ? 43 : $isPay.hashCode());
        final Object $isShow = this.getIsShow();
        result = result * 59 + (($isShow == null) ? 43 : $isShow.hashCode());
        final Object $grade = this.getGrade();
        result = result * 59 + (($grade == null) ? 43 : $grade.hashCode());
        final Object $name = this.getName();
        result = result * 59 + (($name == null) ? 43 : $name.hashCode());
        final Object $money = this.getMoney();
        result = result * 59 + (($money == null) ? 43 : $money.hashCode());
        final Object $discount = this.getDiscount();
        result = result * 59 + (($discount == null) ? 43 : $discount.hashCode());
        final Object $image = this.getImage();
        result = result * 59 + (($image == null) ? 43 : $image.hashCode());
        final Object $icon = this.getIcon();
        result = result * 59 + (($icon == null) ? 43 : $icon.hashCode());
        final Object $explain = this.getExplain();
        result = result * 59 + (($explain == null) ? 43 : $explain.hashCode());
        return result;
    }
}
